package the.guanzhong.express.interfaces.controller.resp;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Map;

@Data
public class CargoListResp implements Serializable {
    private static final long serialVersionUID = -3607177825001498500L;
    private Integer id;
    private Integer cargoType;
    private String name;
    private Integer count;
    private Preferential preferential = new Preferential();

    private Map<String, Object> priceList;

    /**
     * 优惠价
     */
    @Data
    public static class Preferential implements Serializable {
        private static final long serialVersionUID = -1108976233484981541L;

        public Preferential() {
            this.onSale = false;
        }

        /**
         *  是否优惠
         */
        private Boolean onSale;

        /**
         * 折扣力度
         */
        private BigDecimal discount = BigDecimal.valueOf(0.5);

        /**
         * 优惠说明
         */
        private String desc;
    }

}
